<div class="am-modal am-modal-alert" tabindex="-1" id="my-alert">
    <div class="am-modal-dialog">
        <div class="am-modal-hd">提醒</div>
        <div class="am-modal-bd message">
        </div>
        <div class="am-modal-footer">
            <span class="am-modal-btn" data-am-modal-confirm>确定</span>
        </div>
    </div>
</div>
<div class="am-modal am-modal-confirm" tabindex="-1" id="my-confirm">
    <div class="am-modal-dialog">
        <div class="am-modal-hd">警告</div>
        <div class="am-modal-bd message">
        </div>
        <div class="am-modal-footer">
            <span class="am-modal-btn" data-am-modal-cancel>取消</span>
            <span class="am-modal-btn" data-am-modal-confirm>确定</span>
        </div>
    </div>
</div>
<script>
    function Malert(message,callback) {
        $("#my-alert .message").text(message);
        $("#my-alert").modal({
            onConfirm: callback
        });
    }
    function Mconfirm(message,callback){
        $("#my-confirm .message").text(message);
        $('#my-confirm').modal({
            relatedTarget: this,
            onConfirm: callback
        });
    };
</script>